home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / nethack.lha / nethack-3.1 / include / winami.h < prev    next >
C/C++ Source or Header  |  1993-01-18  |  3KB  |  83 lines

  1. /*    SCCS Id: @(#)winami.h    3.1    93/01/17    */
  2. /* Copyright (c) Kenneth Lorber, Bethesda, Maryland, 1991. */
  3. /* Copyright (c) Gregg Wonderly, Naperville, Illinois, 1992, 1993. */
  4. /* NetHack may be freely redistributed.  See license for details. */
  5.  
  6. #ifndef WINAMI_H
  7. #define WINAMI_H
  8.  
  9. /* descriptor for Amiga Intuition-based windows.  If we decide to cope with
  10.  * tty-style windows also, then things will need to change. */
  11. /* per-window data */
  12. struct WinDesc {
  13.     xchar type;            /* type of window */
  14.     boolean active;        /* true if window is active */
  15.     xchar offx, offy;        /* offset from topleft of display */
  16.     short rows, cols;        /* dimensions */
  17.     short curx, cury;        /* current cursor position */
  18.     short maxrow, maxcol;    /* the maximum size used -- for INVEN wins */
  19.                 /* maxcol is also used by WIN_MESSAGE for */
  20.                 /* tracking the ^P command */
  21.     char **data;        /* window data [row][column] */
  22.     char *resp;            /* valid menu responses (for NHW_INVEN) */
  23.     char *canresp;        /* cancel responses; 1st is the return value */
  24.     char *morestr;        /* string to display instead of default */
  25. /* amiga stuff */
  26.     struct Window *win;        /* Intuition window pointer */
  27. #ifdef    INTUI_NEW_LOOK
  28.     struct ExtNewWindow *newwin;    /* NewWindow alloc'd */
  29. #else
  30.     struct NewWindow *newwin;    /* ExtNewWindow alloc'd */
  31. #endif
  32. #define FLMAP_INGLYPH    1    /* An NHW_MAP window is in glyph mode */
  33. #define FLMAP_CURSUP    2    /* An NHW_MAP window has the cursor displayed */
  34.     long flags;
  35.     short cursx, cursy;        /* Where the cursor is displayed at */
  36.     short curs_apen,        /* Color cursor is displayed in */
  37.       curs_bpen;
  38. };
  39.  
  40. /* descriptor for intuition-based displays -- all the per-display data */
  41. /* this is a generic thing - think of it as Screen level */
  42.  
  43. struct DisplayDesc {
  44. /* we need this for Screen size (which will vary with display mode) */
  45.     uchar rows, cols;        /* width & height of display in text units */
  46.     short xpix, ypix;        /* width and height of display in pixels */
  47.     int toplin;            /* flag for topl stuff */
  48.     int rawprint;        /* number of raw_printed lines since synch */
  49.     winid lastwin;        /* last window used for I/O */
  50. };
  51.  
  52. typedef enum {
  53.     WEUNK, WEKEY, WEMOUSE, WEMENU,
  54. } WETYPE;
  55.  
  56. typedef struct WEVENT
  57. {
  58.     WETYPE type;
  59.     union {
  60.         int key;
  61.         struct {
  62.             int x, y;
  63.             int qual;
  64.         } mouse;
  65.         long menucode;
  66.     } u;
  67. } WEVENT;
  68.  
  69. #define MAXWIN 20        /* maximum number of windows, cop-out */
  70.  
  71. /* port specific variable declarations */
  72. extern winid WIN_BASE;
  73. #define NHW_BASE    6
  74.  
  75. extern struct WinDesc *wins[MAXWIN + 1];
  76.  
  77. extern struct DisplayDesc *amiIDisplay;    /* the Amiga Intuition descriptor */
  78.  
  79. extern char morc;        /* last character typed to xwaitforspace */
  80. extern char defmorestr[];    /* default --more-- prompt */
  81.  
  82. #endif /* WINAMI_H */
  83.